#include "UdpServer.hpp"
#include "Usage.hpp"
#include <memory>
#include <cstdio>

int main(int argc, char* argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        return USAGE_ERROR;
    }
    // std::string ip = argv[1];
    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<UdpServer> server = std::make_unique<UdpServer>(port);
    server->Init();
    server->Start();
    return 0;
}